using System.Globalization;
using System.Reflection;

namespace UnitTesting.Fixturing
{
	class NamedArgument<T> : GenericTypedArgument<T>
	{
		readonly string _name;

		public string Name
		{
			get { return _name; }
		}

		internal NamedArgument(string name, T value) : base(value)
		{
			_name = name;
		}

		public override bool Equals(ParameterInfo other)
		{
			return base.Equals(other) && _name == other.Name;
		}

		public override string ToString()
		{
			return string.Format(CultureInfo.InvariantCulture, "Name: {1}, {0}", base.ToString(), _name);
		}
	}
}